package com.ideacode.bean;

import java.sql.Timestamp;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity @Table(name = "tb_user")
public class TbUser {
	private static final long serialVersionUID = -7060210544600464481L; 
	
	private long id;
	private String userName;
	private String userEmail;
	private String userPassword;
	private Date userRegtime;
	private Date userEdittime;
	private Date userLogintime;	
	private String udf1;
    private String udf2;
    private String udf3;
	private int taskType;
	
	public TbUser(){
		
	}
	
	public TbUser(String userName){
        this.userName = userName;
    } 
	
	@Id @Column(name = "id",length=20)
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	
	 @Column(name= "user_name",length=100)
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	
	@Column(name= "user_email",length=100)
	public String getUserEmail() {
		return userEmail;
	}
	public void setUserEmail(String userEmail) {
		this.userEmail = userEmail;
	}
	
	@Column(name= "user_password",length=50)
	public String getUserPassword() {
		return userPassword;
	}
	public void setUserPassword(String userPassword) {
		this.userPassword = userPassword;
	}
	
	@Column(name= "user_regtime")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getUserRegtime() {
		return userRegtime;
	}
	public void setUserRegtime(Date userRegtime) {
		this.userRegtime = userRegtime;
	}
	
	@Column(name= "user_edittime")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getUserEdittime() {
		return userEdittime;
	}
	public void setUserEdittime(Date userEdittime) {
		this.userEdittime = userEdittime;
	}
	
	@Column(name= "user_logintime")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getUserLogintime() {
		return userLogintime;
	}
	public void setUserLogintime(Date userLogintime) {
		this.userLogintime = userLogintime;
	}
	
	@Column(name = "udf1",length=100,nullable=true)
	public String getUdf1() {
		return udf1;
	}
	public void setUdf1(String udf1) {
		this.udf1 = udf1;
	}
	
	@Column(name = "udf2",length=100,nullable=true)
	public String getUdf2() {
		return udf2;
	}
	public void setUdf2(String udf2) {
		this.udf2 = udf2;
	}
	
	@Column(name = "udf3",length=100,nullable=true)
	public String getUdf3() {
		return udf3;
	}
	public void setUdf3(String udf3) {
		this.udf3 = udf3;
	}
	
	@Column(name = "taskType",length=10,nullable=true)
	public int getTaskType() {
		return taskType;
	}
	public void setTaskType(int taskType) {
		this.taskType = taskType;
	}
	
}
